package com.easy.activiti.ext;

import com.easy.activiti.listener.*;
import org.activiti.engine.delegate.event.ActivitiEventType;

import java.lang.annotation.*;

/**
 * @author zhouchuang
 * 2024-11-05 14:21:38
 */
@Target({ElementType.TYPE,ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface OnActivitiEvent {
    //key
    String value() default "";
    //任务类型
    Type type() default Type.NONE;

    //任务名称
    String name() default "";

    public static  enum Type{
        NONE("none"),
        PROCESS_COMPLETED("process_completed"),
        PROCESS_STARTED("process_started"),
        TASK_CREATED("created"),
        TASK_ASSIGNED("assigned"),
        TASK_COMPLETED("completed");

        private String value;
        Type(String value){
            this.value = value;
        }

        public String getValue() {
            return value;
        }
    }
}
